﻿
using System.Collections;
using System.Collections.Generic;
using UGUIFW;
using UnityEngine;
using UnityEngine.UI;

public class HeroInfoUI : BaseUI
{
    Button btn;
    public HeroInfoUI(UIInfo info) : base(info)
    {
    }
    public override void Display()
    {
        base.Display();
        btn = transform.Find("HeroInfo").GetComponent<Button>();
        btn.onClick.AddListener(() =>
        {
            ShowUI(EUIName.HeroInfoDetail_UI);
        });
        RigisterButtonObjectEvent("Btn1",
        p =>
        {
            ShowUI(EUIName.Normal_01, true, ActionTest, "测试传参-异步加载");
        });
        RigisterButtonObjectEvent("Btn2",
        p =>
        {
            ShowUI(EUIName.Normal_02, false, ActionTest, "测试传参");
        });
    }

    void ActionTest()
    {
        Debug.Log("这是个测试数据,用Show方法传过去的,异步加载UI也可以调用");
    }
}
